﻿<%@ Page Title="Login into Home Account Tracker" Language="C#" MasterPageFile="Layout.master"
    AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Theme="Default"
    Buffer="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolder1" runat="Server">
    <div>
        <asp:Literal ID="ltMessage" runat="server" />
    </div>
    <br />
    <div>
        <fieldset style="padding: 10px">
            <br />
            <asp:Login ID="LoginControl" runat="server" Width="350px" PasswordRecoveryText="Forgot Password?"
                LoginButtonText="Sign In" PasswordRecoveryUrl="~/RecoverPassword.aspx" OnAuthenticate="AuthenticateLogin"
                OnLoginError="LoginControl_LoginError" CreateUserText="Create New Account" CreateUserUrl="~/NewAccount.aspx"
                BorderPadding="2">
                <LayoutTemplate>
                    <table cellpadding="2" cellspacing="0" style="border-collapse: collapse;">
                        <tr>
                            <td>
                                <table cellpadding="0" style="width: 350px;">
                                    <tr>
                                        <td align="center" colspan="2" style="font-size: large">
                                            Log In
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="UserName" runat="server" Width="200px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="LoginControl">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="LoginControl">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2" style="color: Red;">
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="2">
                                            <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Sign In" ValidationGroup="LoginControl" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:HyperLink ID="CreateUserLink" runat="server" NavigateUrl="~/NewAccount.aspx">Create New Account</asp:HyperLink>
                                            <br />
                                            <asp:HyperLink ID="PasswordRecoveryLink" runat="server" NavigateUrl="~/RecoverPassword.aspx">Forgot Password?</asp:HyperLink>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:Login>
        </fieldset>
    </div>
</asp:Content>
